<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>节点</title>
	<style type="text/css">
		.box{
			width: 400px;
			height: 400px;
			background: red url() 0 0 no-repeat;
		}

		.box1{
			width: 400px;
			height: 400px;
			background: #A349A4 url() 0 0 no-repeat;
		}

		.son{
			width: 200px;
			height: 200px;
			background: blue url() 0 0 no-repeat;
		}

	</style>
	<script type="text/javascript">
		window.onload = function  () {
			// son = document.getElementsByClassName('son');

			// son[0].parentNode.parentNode.childNodes[3].nextSibling.nextSibling.style.backgroundColor="yellow";
			// 
			del = document.getElementsByClassName('del');

			for (var i = 0; i < del.length; i++) {
				
				run(i);

			};

			function run (x) {
				del[x].onclick = function  () {
					del[x].parentNode.parentNode.style.display='none';
				}
			}



		}

	</script>

</head>
<body>
	<!-- <span>sdfsdf</span>
	<div class="box">
		
		<div class="son">
			son
		</div>
	</div>
	<div class="box1"></div></body> -->
	<table border="1" style="text-align:center">
		<tr>
			<td>姓名</td>
			<td>性别</td>
			<td>年龄</td>
			<td>操作</td>
		</tr>
		<tr>
			<td>1小明</td>
			<td>男</td>
			<td>18</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>2小王</td>
			<td>女</td>
			<td>17</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>3小明</td>
			<td>男</td>
			<td>18</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>4小王</td>
			<td>女</td>
			<td>17</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>5小明</td>
			<td>男</td>
			<td>18</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>6小王</td>
			<td>女</td>
			<td>17</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>7小明</td>
			<td>男</td>
			<td>18</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>8小王</td>
			<td>女</td>
			<td>17</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>9小明</td>
			<td>男</td>
			<td>18</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
		<tr>
			<td>10小王</td>
			<td>女</td>
			<td>17</td>
			<td><input class="del" type="button" value="删除"><input type="button" value="修改"></td>
		</tr>
	</table>
</html>